From: Michael Albinus Date: Fri, 3 Dec 2021 14:50:09 +0000 (+0100) Subject: Fix dired--insert-disk-space X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~16^2~4058^2~34 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=2bd1b1ace8281c92d74e9eb14dc39210517949fa;p=emacs.git Fix dired--insert-disk-space * lisp/dired.el (dired--insert-disk-space): Handle case `get-free-disk-space' returns nil. --- diff --git a/lisp/dired.el b/lisp/dired.el index d03c79df40d..d0e547ba0b1 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -1650,7 +1650,7 @@ see `dired-use-ls-dired' for more details.") ;; Replace "total" with "total used in directory" to ;; avoid confusion. (replace-match "total used in directory" nil nil nil 1)) - (when-let ((available (get-free-disk-space file))) + (if-let ((available (get-free-disk-space file))) (cond ((eq dired-free-space 'separate) (end-of-line) @@ -1672,7 +1672,8 @@ see `dired-use-ls-dired' for more details.") (forward-line 1) (point)) (t - beg)))))) + beg)) + beg)))) (defun dired-insert-set-properties (beg end) "Add various text properties to the lines in the region, from BEG to END."